package com.oplink.webems.modules.cfg.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.oplink.webems.common.persistence.BaseDao;
import com.oplink.webems.common.persistence.BaseDaoImpl;
import com.oplink.webems.modules.cfg.entity.CfgSite;

/**
 * Configuration Site Dao
 * 
 * @author yizhang
 */
public interface CfgSiteDao extends CfgSiteDaoCustom, CrudRepository<CfgSite, Long> {

	@Query("from CfgSite where sname=?1")
	public List<CfgSite> getSiteByName(String name);

}

interface CfgSiteDaoCustom extends BaseDao<CfgSite> {

}

@Component
class CfgSiteDaoImpl extends BaseDaoImpl<CfgSite> implements CfgSiteDaoCustom {

}